package top.guoziyang.rpc.registry;

import top.guoziyang.rpc.registry.ServiceRegistry;
import top.guoziyang.rpc.registry.nacos.NacosServiceRegistry;
import top.guoziyang.rpc.registry.zk.ZkServiceRegistryImpl;

public class ServiceRegistryFactory {
    public static ServiceRegistry getServiceRegistry(String registryType) {
        if ("zk".equalsIgnoreCase(registryType)) {
            return new ZkServiceRegistryImpl();
        } else if ("nacos".equalsIgnoreCase(registryType)) {
            return new NacosServiceRegistry();
        }
        // 处理其他类型或默认情况
        return null;
    }
}
